﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PhotoList.ascx.cs" Inherits="Module_Photos_Controls_PhotoList" %>
<%@ Register TagPrefix="avg" Namespace="Avg.Controls" Assembly="SmartPager" %>
<%@ Import Namespace="DemoObject" %>
<%@ Import Namespace="BusinessObjects" %>
<div>
    <h3>
        <a href="" title="" class="title">
            <%=AlbumName %></a>
    </h3>
</div>
<div style="width: 700px; padding-top: 5px; margin: 0 auto; background-color: #FFF87F"
    class="clearfix">
    <div class="view_flash" style="width: 700px; height: 450px;" id="photo_flashplayer_id">
    </div>
</div>

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        window.scrollTo(0, 100);
        createSlideShow();
        function createSlideShow() {

            var soSlideShow = new SWFObject('/flash/slideshow.swf', 'photo_flashplayer', '700', '450', '9.0.0', '#000000');
            soSlideShow.addVariable('mAuto', 'true');
            soSlideShow.addVariable('xmlPath', '/userfiles/xmlfile/<%=AlbumTextId %>.xml');
            soSlideShow.addParam('allowScriptAccess', 'always');
            soSlideShow.addParam('allowfullscreen', 'true');
            soSlideShow.addParam('wmode', 'transparent');
            soSlideShow.useExpressInstall('/flash/expressinstall.swf');
            bolIsPlugin = soSlideShow.write('photo_flashplayer_id');
            if (!bolIsPlugin)
                $('#no_plugin').removeAttr('style');
        }
    });
</script>

<div style="margin-top: 20px; background-color: White">
    <asp:Repeater runat="server" ID="rpt">
        <ItemTemplate>
            <div style="width: 25%; float: left; text-align: center; padding-bottom: 20px;">
                <a class="title1" href='<%#UrlBuilder.UrlAlbumList(Eval("TextId").ToString()) %>'
                    title="<%#Eval("Name") %>">
                    <img alt="" src='<%#UrlBuilder.ImageUrl(Eval("ImageUrl").ToString(),80,80)%>' />
                </a>
                <br />
                <a class="title1" href='<%#UrlBuilder.UrlAlbumList(Eval("TextId").ToString()) %>'
                    title="<%#Eval("Name") %>">
                    <%#Eval("Name") %>
                </a>
            </div>
            <%#(Container.ItemIndex+1)%4==0? "<div class='clear'></div>":"" %>
        </ItemTemplate>
    </asp:Repeater>
    <div style="clear: both">
    </div>
</div>
<avg:SmartPager ID="smartPager" runat="server" Visible="false" />
